/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package demonstration.tab;

import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableColumnModel;
import javax.swing.table.TableColumn;

/**
 *
 * @author Nastya
 */
public class DataColumnTableModel extends DefaultTableColumnModel {

    private TableColumn[] columns = new TableColumn[5];

    public DataColumnTableModel() {
        columns[0] = new TableColumn(0, 100);
        columns[0].setHeaderValue("Artist");
        columns[1] = new TableColumn(1, 100);
        columns[1].setHeaderValue("User");
        columns[2] = new TableColumn(2, 100, new DeviationRenderer(), null);
        columns[2].setHeaderValue("Deviation");
        columns[3] = new TableColumn(3, 100, new RatingRenderer(), null);
        columns[3].setHeaderValue("Expected rating");
        columns[4] = new TableColumn(4, 100, new RatingRenderer(), null);
        columns[4].setHeaderValue("Actual rating");
    }
    
    
    
    @Override
    public int getColumnCount() {
        return 5;
    }

    @Override
    public TableColumn getColumn(int columnIndex) {
        return columns[columnIndex];
    }
    
    
    
}
